import asyncio
from datetime import datetime

async def long_task():
    await asyncio.sleep(10)
    print(f"{datetime.now()}: Task finished")

async def main():
    try:
        print("Start:", datetime.now())
        await asyncio.wait_for(long_task(), timeout=5)
        # await asyncio.wait_for(long_task(), timeout=11)
    except asyncio.TimeoutError:
        print(f"{datetime.now()}: Task timed out")

asyncio.run(main())